import axios from "axios";

let context = "/storeservice";

/**
 * 获取 Store 分页列表
 */
export function getStorePagination(data: any) {
  return axios.get(`${context}/store/pagination`, { params: data });
}

/**
 * 获取 Store 所有数据
 */
export function getStoreAllList(data: any) {
  return axios.get(`${context}/store/allList`, { params: data });
}

/**
 * 获取 Store 详情
 */
export function getStoreDetailById(id: any) {
  return axios.get(`${context}/store/${id}`, { params: { id } });
}

/**
 * 新增 Store
 */
export function addStore(data: any) {
  return axios.post(`${context}/store`, data);
}

/**
 * 批量新增
 * */
export function batchAddStore(data: any) {
  return axios.post(`${context}/store/batchLoad`, data);
}

/**
 * 修改 Store
 */
export function updateStore(data: any) {
  return axios.put(`${context}/store`, data);
}

/**
 * 删除 Store
 */
export function batchRemoveStore(data: any) {
  return axios.post(`${context}/store/batchRemove`, data);
}
